<script>
var imagesSuffix=["html","htm","ftl","xml","text","text"];
function checkFileType(){
	var filenames=$('input[name=file]',$.pdialog.getCurrent()).val().toLowerCase().split('.');
	if(-1 != $.inArray(filenames[filenames.length-1], imagesSuffix)){
		return true;
	}
	alertMsg.error('请选择文本类型模板文件');
	return false;
}
</script>
<form action="cmsTemplate/doUpload.do?callbackType=closeCurrent&navTabId=cmsTemplate/list" method="post" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return iframeCallback(this, dialogAjaxDone)">
	<div class="formBar">
		<ul>
			<li><button type="submit" class="buttonActive" onclick="return checkFileType();">上传</button></li>
			<li><button type="button" class="button close">关闭</button></li>
		</ul>
	</div>
	<div class="pageFormContent" layoutH="56">
		<dl>
			<dt>文件:</dt>
			<dd>
				<input type="hidden" name="path" value="${path!}"/>
				<input type="file" name="file" class="required" size="30" />
			</dd>
		</dl>
	</div>
</form>